#ifndef MATRIX_TRANSFORM_OSG
#define MATRIX_TRANSFORM_OSG
#include <DefinePluginOsg.h>
#include <QObject>
#include <osg/MatrixTransform>
#include <OsgClassDataSource/TransformOsg.h>
#include <QMatrix4x4>
#include <QVarintTrigger.h>

class DLL_EXPORT_PLUGIN_OSG MatrixTransformOsg : public TransformOsg
{
	Q_OBJECT
        Q_PROPERTY(QMatrix4x4 Matrix READ getMatrix WRITE setMatrix)
        Q_PROPERTY(QVarintTrigger EliminateScale READ getTriggerEliminateScale WRITE setTriggerEliminateScale)
        Q_PROPERTY(QVarintTrigger EliminateRotate READ getTriggerEliminateRotate WRITE setTriggerEliminateRotate)
        Q_PROPERTY(QVarintTrigger Small_100 READ getTriggerSmall_100 WRITE setTriggerSmall_100)
        Q_PROPERTY(QVarintTrigger OBBboxPrint READ getTriggerOBBboxPrint WRITE setTriggerOBBboxPrint)

public:
    MatrixTransformOsg(QObject *parent = 0);
    virtual ~MatrixTransformOsg();

    QMatrix4x4 getMatrix();
    void setMatrix(QMatrix4x4 matrix);

    QVarintTrigger getTriggerEliminateScale();
    void setTriggerEliminateScale(QVarintTrigger trigger);

    QVarintTrigger getTriggerEliminateRotate();
    void setTriggerEliminateRotate(QVarintTrigger trigger);

    QVarintTrigger getTriggerSmall_100();
    void setTriggerSmall_100(QVarintTrigger trigger);

    QVarintTrigger getTriggerOBBboxPrint();
    void setTriggerOBBboxPrint(QVarintTrigger trigger);


//----------------------------------------
    virtual void copyFrom(EObject* objPtr);
    virtual EObject* clone();
signals:
    void signalMatrixChanged(QMatrix4x4 matrix);

private:
    QMatrix4x4 m_matrix;
};
#endif // MATRIX_TRANSFORM_OSG
